package Unix::RatfinderRemote;
use strict;
use Exporter;
our @ISA = 'Exporter';
use GRID::Machine;

our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); 
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw(getHosts searchRemote);
our $VERSION = '0.01';


sub getHosts {#{{{
	my	$rc_file_name = shift || $ENV{'HOME'};		# input file name

	open  my $rc, '<', $rc_file_name
		or die  "$0 : failed to open  input file '$rc_file_name' : $!\n";
	my @hosts;
	while (<$rc>)
	{
		if (/hosts=(.*)/)
		{
			@hosts = split (/,/ , $1);
			last;
		}
	}
	close  $rc
		or warn "$0 : failed to close input file '$rc_file_name' : $!\n";
	return @hosts;
}	# ----------  end of subroutine getHosts  ----------#}}}

sub searchRemote{#{{{
	my	$machine = shift || exit;
	my	$command = shift || exit;
	my	$m = shift || exit;
	my @results = $m->qx($command);
	return @results;
}	# ----------  end of subroutine searchRemote  ----------#}}}
1;

# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##
